<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div>水果列表</div>
        <li v-for='item in fruits' v-text='item'></li>
        <li v-for='(item,index) in fruits'>{{item +'-----'+ index}}</li>
        <li :key='item.id' v-for='(item,index) in myFruits'>
            <span>{{item.ename}}</span>
            <span>----------</span>
            <span>{{item.cname}}</span>
        </li>
    </div>
    <script src="./vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                fruits: ['apple', 'banana', 'orange'],
                myFruits: [{
                    id: 1,
                    ename: 'banana',
                    cname: '香蕉',
                }, {
                    id: 2,
                    ename: 'orange',
                    cname: '橘子'
                }, {
                    id: 3,
                    ename: 'apple',
                    cname: '苹果'
                }]
            }
        })
    </script>
</body>

</html>